<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="text" :value="msg"><br>
        <img :src="imgPath" width="300" height="300"><br>
        <h3>表达式</h3>
        单价：<input type="text" v-model="price"><br>
        数量：<input type="text" v-model="num"><br>
        总价：{{price*num}}<br>
        {{ok?'yes':'no'}}

    </div>

    <script>
        var vueObj = new Vue({
            el:"#app",
            data:{
                msg:"hello",
                imgPath:"img/3.jpg",
                price:2,
                num:1,
                ok:3>2
            },
            created() {
                console.log("创建");
            },
            mounted(){
                console.log("渲染")
            },
            updated(){
                console.log("更新");
            },
            destroy(){
                console.log("销毁");
            }
        });
    </script>
</body>
</html>